//
// IntensityTimeDomainView.m
// NLSE Solver, Created by jmpp on 9/2/10.
// $Id: IntensityTimeDomainView.m 16 2010-11-03 14:19:32Z jmpalacios $

/**
* =================================================================
* Copyright (C) 2010, Juan Manuel Palacios. All Rights Reserved.
*
* This software project, which includes this module, is licensed
* as described in the file LICENSE, which you should have received
* as part of this distribution, and may be used only according to
* the terms described therein.
*
* =================================================================
**/


#import "IntensityTimeDomainView.h"
#import "NLSESolverWindowController.h"
#import "ssfm.h"


@implementation IntensityTimeDomainView


/* This is where the main OpenGL code for general purpose drawing goes, i.e. the "rendering" */
- (void) drawRect:(NSRect)dirtyRect
{
    
    if ([viewController libInput] != NULL)
    {
        GLfloat red[4] =
        {
            1.0f,
            0.0f,
            0.0f,
            0.0f
        };
        ssfm_analysis((GLsizei)dirtyRect.size.width,(GLsizei)dirtyRect.size.height,red);
    }    
    else
    {
        [self drawEmptyGraph];
    }
    [[self openGLContext] flushBuffer];

    return;
    
}


@end
